home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HTBasic 9.3
/
HTBasic 9.3.iso
/
83win
/
data1.cab
/
Basic_Plus_Examples
/
HPGLPANL
< prev
next >
Wrap
Text File
|
2001-03-02
|
1KB
|
27 lines
10 ! **********************************************************
20 ! Example: HPGL VIEW Widget in PANEL
30 !
40 ! This program first displays a mechanical drawing and
50 ! then displays a "Parts Dimension" display of the drawing.
60 ! You can use the scrollbars to look at any part of the
70 ! drawing.
80 !
90 ! **********************************************************
100 !
110 INTEGER Screen(1:4),S_width,S_height,Width,Height
120 GESCAPE CRT,3;Screen(*)
130 ASSIGN @Panel TO WIDGET "PANEL";SET ("X":0,"Y":0,"WIDTH":Screen(3)+1,"HEIGHT":Screen(4)+1,"TITLE":" Part Dimensions")
140 CONTROL @Panel;SET ("SYSTEM MENU":"Quit")
150 ON EVENT @Panel,"SYSTEM MENU" GOTO Finis
160 STATUS @Panel;RETURN ("INSIDE WIDTH":S_width,"INSIDE HEIGHT":S_height)
170 ASSIGN @Hpgl1 TO WIDGET "HPGL VIEW";SET ("BACKGROUND":0,"X":0,"Y":0,"WIDTH":S_width,"HEIGHT":S_height,"BORDER":0,"HPGL FILE":"HELP_EX/MECH.GL","RETAIN RASTER":1),PARENT @Panel
180 Width=(Screen(3)+1)/3
190 Height=(Screen(4)+1)/3
200 CONTROL @Panel;SET ("X":(Screen(3)-Width)/2,"Y":(Screen(4)-Height)/2,"WIDTH":Width,"HEIGHT":Height)
210 CONTROL @Panel;SET ("BACKGROUND":0,"SIZE CONTROL":"SCROLLABLE","SCROLL WIDTH":S_width,"SCROLL HEIGHT":S_height)
220 ON EVENT @Panel,"RESIZED" GOTO Looping
230 Looping: LOOP
240 WAIT FOR EVENT
250 END LOOP
260 Finis: END